/**
 * Research topics list
 * 
 * Every research topic have to got a relation with year
 * 
 * 
 */

const Sequelize = require('sequelize');
const MySQLManager = require('../utils/MySQLManager');


const Topics = MySQLManager.define('topics', {

	teacher_fullname: {
        type: Sequelize.STRING,
		allowNull: true
    },

    // 所属年度
    years: {
        type: Sequelize.STRING,
        allowNull: false
    },

    // 选题开始时间
    // srart_time: {
    //     type: Sequelize.STRING
    // },

    // 选题结束时间
    // end_time: {
    //     type: Sequelize.STRING
    // },

    //   与教师的校园卡号关联
	teacher_user_name: {
		type: Sequelize.STRING,
		allowNull: false
    },

    //    课题名称  
    topic_name: {
        type: Sequelize.STRING
    },

    //   课题来源
    topic_resource: {
        type: Sequelize.STRING(1024)
    },
    
    //   研究方向
    research_direction: {
        type: Sequelize.STRING(1024)
    },

    // 可携带人数
    student_limit: {
        type: Sequelize.STRING,
        defaultValue: 0
    },

    // 确认数
    confirm_num: {
        type: Sequelize.INTEGER ,
        defaultValue: 0
    },

    // 状态 0锁定 1解锁
    topic_status: {
        type: Sequelize.STRING,
        defaultValue: '1'
    },

    // 课题背景
    topic_background: {
        type: Sequelize.STRING(1024)
    },

    // 课题工作
    topic_work: {
        type: Sequelize.STRING(1024)
    },

    // 技能要求
    requisite_skills: {
        type: Sequelize.STRING(1024)
    },

    // 备注
    topic_remark: {
        type: Sequelize.STRING(1024)
    },

    
    // 当前报名人数
    current_student: {
        type: Sequelize.INTEGER,
        defaultValue: 0
    },

    // 老师邮箱
    // teacher_email: {
    //     type: Sequelize.STRING
    // },

    // 老师办公室
    // teacher_address: {
    //     type: Sequelize.STRING
    // },

    // 老师手机
    // teacher_phone: {
    //     type: Sequelize.STRING
    // },

    // 

    // //   备用字段
	//   beiyong1: {
	// 	type: Sequelize.STRING
	//   },
	//   beiyong2: {
	// 	type: Sequelize.STRING
	//   },
	//   beiyong3: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong4: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong5: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong6: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong7: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong8: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong9: {
	// 	type: Sequelize.STRING
    //   },
    //   beiyong10: {
	// 	type: Sequelize.STRING
	//   }
});


module.exports = Topics

